<%= content_for(:page_title) do %>
  <%= Spree.t('admin.edit_profile') %>
<% end %>

<%= content_for :page_actions do %>
  <%= turbo_save_button_tag Spree.t('actions.update'), form: 'edit_user', data: { admin_target: 'save' } %>
<% end %>

<div class="row">
  <div class="col-lg-6 offset-lg-3">
    <%= form_for @user, url: spree.admin_profile_path, method: :put, as: :user do |f| %>
      <div class="card mb-4">
        <div class="card-header">
          <h5 class="card-title"><%= Spree.t('admin.personal_details') %></h5>
        </div>
        <div class="card-body">
          <%= f.spree_email_field :email, required: true %>
          <%= f.spree_text_field :first_name, required: true %>
          <%= f.spree_text_field :last_name, required: true %>
          <%= f.spree_file_field :avatar, crop: true %>
        </div>
      </div>
    <% end %>
  </div>
</div>